<?php 
/* ================================================================================
 * LWAdmin	 
 *
 * main.php: This is the main file for LWAdmin.
 *
 * Author: Eric Hendrickson (enhendrickson@liberty.edu)
 * Date: 2/18/05
   ================================================================================ */

	global $SSO, $Security, $AppID, $User, $DB;

	//Check to see if there is a valid session 
	$SessionInfo = $SSO->isValidSession("index.php?action=login", $SSO->getSessionInformation());	
	
	//Check to see if the user has rights to be on LWAdmin
	$PageRights = array('ADMIN', 'USER');
	$Security->ValidateUser($SessionInfo['username'], $AppID, $PageRights, 1);
	
	//Grab the user info
	$UserInfo = $User->GetUserInfo($SessionInfo['username']);
?>


<table cellpadding="0" cellspacing="0" width="100%" border="0">
	<tr>
		<td>
			<?php 
			if($Security->ValidateUser($SessionInfo['username'], $AppID, array('ADMIN','USERADMIN')))
			{
			print <<< ___USERS___
				<tr>
					<td style="border-bottom:1px solid #CCCCCC;">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td valign="middle">
									<a href="index.php?action=users" class="L1">Users</a>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td><span class="T1">The Users page allows you to edit, add, and remove users for the website.  Using this page you can enter/update information for each user such as full name, email address, phone number, etc.  You can also use this page to add users to ministries.</span>
					</td>
				</tr>
				<tr>
					<td><br>
					</td>
				</tr>
___USERS___;
			}
			if($Security->ValidateUser($SessionInfo['username'], $AppID, array('ADMIN','MINIADMIN')))
			{
			print <<< ___MINISTRIES___
				<tr>
					<td style="border-bottom:1px solid #CCCCCC;">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td valign="middle">
									<a href="index.php?action=ministries" class="L1">Ministries</a>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td><span class="T1">The Ministries Page you to edit, add, and remove ministries for the website.  Using this tool you can enter/update information for each ministry such as the name of the ministry, the head of the ministry, etc.</span>
					</td>
				</tr>
				<tr>
					<td><br>
					</td>
				</tr>
___MINISTRIES___;
					}
			if($Security->ValidateUser($SessionInfo['username'], $AppID, array('ADMIN')))
			{
			print <<< ___APPROLE___
				<tr>
					<td style="border-bottom:1px solid #CCCCCC;">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td valign="middle">
									<a href="index.php?action=applications" class="L1">Applications</a>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td><span class="T1">The Applications Page allows you to edit, add, and remove the applications.  An application is a module of the main site which has been written by the programmer and only will need to be changed in very few and specific circumstances.</span>
					</td>
				</tr>
				<tr>
					<td><br>
					</td>
				</tr>
				<tr>
					<td style="border-bottom:1px solid #CCCCCC;">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td valign="middle">
									<a href="index.php?action=roles" class="L1">Roles</a>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td><span class="T1">The Roles Page allows you to edit, add, and remove the access roles for various applications.  A role is an access level which the programmer has predefined and only need be changed in very few and specific circumstances.</span>
					</td>
				</tr>
___APPROLE___;
	}
?>				
</table>
	 